# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Franco Iacomella <yaco@gnu.org>

pkgname=synfigstudio
pkgver=1.4.4
pkgrel=1
pkgdesc='Professional vector animation program (GUI)'
arch=('loong64' 'x86_64')
url='https://www.synfig.org/'
license=('GPL3')
depends=('gtkmm3' 'synfig')
makedepends=('etl' 'intltool')
optdepends=('python: for the plugins')
source=("https://downloads.sourceforge.net/synfig/$pkgname-$pkgver.tar.gz")
sha256sums=('8893c681ccda6bc34f173d5183e28fbf78feb348f26a7661bc3c038e837eb21f')

prepare() {
  cd $pkgname-$pkgver
  sed -i 's|appdatadir = $(datadir)/appdata|appdatadir = $(datadir)/metainfo|' Makefile.{am,in}
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc --disable-update-mimedb
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
